projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f3cf40
)
usb:composite: use memcpy to avoid unaligned access
author
Piotr Wilczek
<
[email protected]
>
Wed, 10 Apr 2013 12:07:51 +0000
(14:07 +0200)
committer
Marek Vasut
<
[email protected]
>
Sun, 30 Jun 2013 16:41:07 +0000
(18:41 +0200)
This patch memcpy is used instead of an assignment to
avoid unaligned access execption on some ARM platforms.
Signed-off-by: Piotr Wilczek <
[email protected]
>
Signed-off-by: Kyungmin Park <
[email protected]
>
CC: Lukasz Majewski <
[email protected]
>
Tested-by: Heiko Schocher <
[email protected]
>
Acked-by: Heiko Schocher <
[email protected]
>
drivers/usb/gadget/composite.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/composite.c
b/drivers/usb/gadget/composite.c
index f30778a163b2950b2681a5ea9b610a7d74d10fb3..f8677931b46cbbda93ff47c516ebae8acbf508cc 100644
(file)
--- a/
drivers/usb/gadget/composite.c
+++ b/
drivers/usb/gadget/composite.c
@@
-997,7
+997,8
@@
static int composite_bind(struct usb_gadget *gadget)
if (status < 0)
goto fail;
- cdev->desc = *composite->dev;
+ memcpy(&cdev->desc, composite->dev,
+ sizeof(struct usb_device_descriptor));
cdev->desc.bMaxPacketSize0 = gadget->ep0->maxpacket;
debug("%s: ready\n", composite->name);